# makefile for StopRefresh
# cooperation of: zmakebas, asl, p2tap
# POKE 2010

ASL = asl
ASLFLAGS = -c -L -E -U

CPP = cpp
CPPFLAGS = -P

ZMAKEBAS = zmakebas
ZMAKEBASFLAGS = -x

P2TAP = p2tap
P2TAPFLAGS =

RM = rm
RMFLAGS = -f

all: stoprefresh.tap

stoprefresh.tap: basic.tap main.p
	$(P2TAP) main.p stoprefresh.tap -pbasic.tap $(P2TAPFLAGS)
	cp stoprefresh.tap ../

basic.tap: basic.i
	$(ZMAKEBAS) $(ZMAKEBASFLAGS) -a 10 -n StopRefrsh -o basic.tap basic.i 

basic.i: main.h basic.bas
	$(CPP) $(CPPFLAGS) basic.bas > basic.i

main.h main.p: main.a80
	$(ASL) $(ASLFLAGS) main.a80

clean:
	- $(RM) $(RMFLAGS) *.tap *.i *.h *.p *.lst *.log

archive:
	zip ../stoprefresh Makefile basic.bas main.a80
